<h1>Presentation List</h1>

<a href="<?php echo url_for('presentation/new') ?>">Create a new presentation</a>
<dl id="presentation-list">
<?php foreach ($beamr_presentation_list as $beamr_presentation): ?>
  <dt>
    <a href="<?php echo url_for('@presentation_show?token='.$beamr_presentation['token']) ?>">
      <img src="<?php echo sfConfig::get('app_thumbnails_web') .$beamr_presentation->getThumbnail(); ?>" alt="<?php echo $beamr_presentation->getTitle() ?>" />
    </a>
  </dt>
  <dd>
    <ul>
      <li>
        <a href="<?php echo url_for('@presentation_show?token='.$beamr_presentation['token']) ?>" class="large">
          <?php echo $beamr_presentation->getTitle() ?>
        </a>
      </li>
      <li>
        <?php if ($beamr_presentation->getIs_public()) : ?>
          <img src="/images/icons/group.png" alt="" /> Public
        <?php else: ?>
          <img src="/images/icons/lock.png" alt="" /> Private
        <?php endif; ?>
      </li>

      <?php if ($beamr_presentation->getAuthor()): ?>
        <li><span class="fancy">Author</span> : <?php echo $beamr_presentation->getAuthor() ?></li>
      <?php endif ?>

      <?php if ($beamr_presentation->getDate()): ?>
        <li><span class="fancy">Date</span> : <?php echo $beamr_presentation->getDate() ?></li>
      <?php endif ?>

      <?php if ($beamr_presentation->getInstitute()): ?>
        <li><span class="fancy">Institue</span> : <?php echo $beamr_presentation->getInstitute() ?></li>
      <?php endif ?>

      <li>
        <span class="fancy">Created at</span> : <?php echo $beamr_presentation->getCreated_at() ?>
        <?php if ($beamr_presentation->getUpdated_at() != $beamr_presentation->getCreated_at()): ?>
          <br/><span class="fancy">Updated at</span> : <?php echo $beamr_presentation->getUpdated_at() ?>
        <?php endif ?>
      </li>

      <li>
        <a href="<?php echo url_for('@presentation_edit?token='.$beamr_presentation['token']) ?>" class="noicon">
          <img src="/images/icons/pencil.png" alt="" /> Edit properties
        </a>
      </li>
      <li>
        <a href="<?php echo url_for('@presentation_delete?token='.$beamr_presentation['token'], array('method' => 'delete', 'confirm' => 'Are you sure?')) ?>" class="noicon">
          <img src="/images/icons/delete.png" alt="" /> Delete
        </a>
      </li>
      <li>
        <a href="<?php echo url_for('@presentation_latex?token='.$beamr_presentation['token']) ?>" class="noicon">
          <img src="/images/icons/script.png" alt="" /> LaTeX
        </a> - 
        <a href="<?php echo url_for('@presentation_download?token='.$beamr_presentation['token']) ?>" class="noicon">
          <img src="/images/icons/report.png" alt="" /> Download
        </a>
      </li>
    </ul>
  </dd>
<?php endforeach; ?>
</dl>
